from flask import Flask
from exts import db
import config
from blueprints.borrow_record_bp import borrow_blueprint
from blueprints.book_bp import book_blueprint
from blueprints.person_bp import person_blueprint
from flasgger import Swagger

app = Flask(__name__)

app.config.from_object(config)
db.init_app(app)
app.register_blueprint(borrow_blueprint)
app.register_blueprint(person_blueprint)
app.register_blueprint(book_blueprint)
swagger = Swagger(app)


@app.route('/')
def index():
    return "Welcome to the Flask app!"


if __name__ == '__main__':
    app.run()
